home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
develop
/
libsrc11.arc
/
WRBLKEE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-04-27
|
1KB
|
46 lines
/* wrblkee.c 4.2 */
/*F****************************************************************************
FUNCTION NAME: wrblkee
ACTION: Program multiple bytes in EEPROM at address provided.
If address is -1, then the 68HC11 "Config" register is
programmed before other cells in EEPROM are programmed.
PARAMETERS:
addr: offset into EEPROM. This value can be 0 through
the size of EEPROM or -1. If it is -1, the Config
register is to be programmed.
array: pointer to an array of bytes that contain the values
that EEPROM are to be programmed from.
count: number of bytes to program.
RETURNS: (void)
******************************************************************************/
#include <hc11/directives.h>
SMALL
void wrblkee(addr, array, count)
int addr; /* location(s) to be programmed */
unsigned short *array; /* pointer to data to be programmed */
int count; /* number of bytes to be programmed */
{
/****************************************************************/
/* Note that "while ((count--) > 0)" is equivalent to */
/* "while ((--count) >= 0)" but the pre-decrement */
/* version is more efficient than the post-decrement */
/* verison. */
/****************************************************************/
while ((--count) >= 0)
wrbytee(addr++, (unsigned) *(array++));
} /* end of wrblkee */